package com.ant.member.service.impl;

import com.ant.member.dao.UserDao;
import com.ant.member.entity.User;
import com.ant.member.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class UserServiceImpl extends ServiceImpl<UserDao, User> implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public List<User> getAllUser() {
        return userDao.getAllUser();
    }

    @Override
    public User getUserById(String userId) {
        Map<String, Object> param = new HashMap<>();
        param.put("userId", userId);
        return userDao.getUserById(param);
    }
}
